package com.software.sqlite.api.admin.v1.controller;

import com.software.sqlite.common.CommonContant;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * HTML
 */
@Controller
@RequestMapping("")
public class HTMLMoviesController extends BaseController {


    @RequestMapping("/")
    public String home(HttpServletRequest request){
        if(isAdminLogin(request))
        {
            return "index";
        }else{
            return isAdminIndex(request,"page/login",true);
        }
    }

    @RequestMapping("/login")
    public String login(HttpServletRequest request){
        if(isAdminLogin(request))
        {
            return "index";
        }else{
            return isAdminIndex(request,"page/login",true);
        }

    }

    @RequestMapping("/logout")
    public String logout(HttpServletRequest request){
        HttpSession session = request.getSession();
        session.removeAttribute(CommonContant.ADMIN_LOGIN_SESSION);
        return isAdminIndex(request,"page/login",true);
    }

    @RequestMapping("/index")
    public String index(HttpServletRequest request){
        return isAdminIndex(request,"index",true);
    }

    @RequestMapping("/page/welcome")
    public String welcome(HttpServletRequest request){
        return isAdminIndex(request,"page/welcome",true);
    }

    @RequestMapping("/page/404")
    public String p404(HttpServletRequest request){
        return isAdminIndex(request,"page/404",true);
    }

    @RequestMapping("/page/updating")
    public String updating(HttpServletRequest request){
        return isAdminIndex(request,"page/updating",true);
    }

    @RequestMapping("/page/icon")
    public String icon(HttpServletRequest request){
        return isAdminIndex(request,"page/icon",true);
    }

    @RequestMapping("/page/user-password")
    public String userPassword(HttpServletRequest request){
        return isAdminIndex(request,"page/user-password",true);
    }

    @RequestMapping("/page/user")
    public String user(HttpServletRequest request){
        return isAdminIndex(request,"page/user",true);
    }

    @RequestMapping("/page/user/edit")
    public String userEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/user/edit",true);
    }

    @RequestMapping("/page/app")
    public String app(HttpServletRequest request){
        return isAdminIndex(request,"page/app",true);
    }

    @RequestMapping("/page/app/edit")
    public String appEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/app/edit",true);
    }

    @RequestMapping("/page/app/share")
    public String appShare(HttpServletRequest request){
        return isAdminIndex(request,"page/app/share",true);
    }

    @RequestMapping("/page/role")
    public String role(HttpServletRequest request){
        return isAdminIndex(request,"page/role",true);
    }

    @RequestMapping("/page/role/edit")
    public String roleEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/role/edit",true);
    }

    @RequestMapping("/page/role-menu/edit")
    public String roleMenuEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/role-menu/edit",true);
    }


    @RequestMapping("/page/menu")
    public String menu(HttpServletRequest request){
        return isAdminIndex(request,"page/menu",true);
    }

    @RequestMapping("/page/menu/edit")
    public String menuEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/menu/edit",true);
    }

    @RequestMapping("/page/org")
    public String org(HttpServletRequest request){
        return isAdminIndex(request,"page/org",true);
    }

    @RequestMapping("/page/org/edit")
    public String orgEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/org/edit",true);
    }


    @RequestMapping("/page/server/edit")
    public String serverEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/server/edit",false);
    }

    @RequestMapping("/page/server/api")
    public String serverApi(HttpServletRequest request){
        return isAdminIndex(request,"page/server/api",false);
    }


    @RequestMapping("/page/movie")
    public String movie(HttpServletRequest request){
        return isAdminIndex(request,"page/movie",false);
    }

    @RequestMapping("/page/movie/edit")
    public String movieEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/movie/edit",false);
    }

    @RequestMapping("/page/movie/view")
    public String movieView(HttpServletRequest request){
        return isAdminIndex(request,"page/movie/view",false);
    }

    @RequestMapping("/page/movie/video")
    public String movieVideo(HttpServletRequest request){
        return isAdminIndex(request,"page/movie/video",false);
    }


    @RequestMapping("/page/movie/import")
    public String movieImport(HttpServletRequest request){
        return isAdminIndex(request,"page/movie/import",false);
    }


    @RequestMapping("/page/movie-server")
    public String movieServer(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-server",false);
    }

    @RequestMapping("/page/movie-server/edit")
    public String movieServerEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-server/edit",false);
    }

    @RequestMapping("/page/movie-server/view")
    public String movieServerView(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-server/view",false);
    }

    @RequestMapping("/page/movie-server/import")
    public String movieServerImport(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-server/import",false);
    }


    @RequestMapping("/page/movie-user")
    public String movieUser(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user",false);
    }

    @RequestMapping("/page/movie-user/edit")
    public String movieUserEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user/edit",false);
    }

    @RequestMapping("/page/movie-user/view")
    public String movieUserView(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user/view",false);
    }

    @RequestMapping("/page/movie-user/import")
    public String movieUserImport(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user/import",false);
    }

    @RequestMapping("/page/recharge-bill")
    public String rechargeBill(HttpServletRequest request){
        return isAdminIndex(request,"page/recharge-bill",false);
    }

    @RequestMapping("/page/movie-user-bill")
    public String movieUserBill(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-bill",false);
    }

    @RequestMapping("/page/movie-user-bill/edit")
    public String movieUserBillEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-bill/edit",false);
    }

    @RequestMapping("/page/movie-user-bill/view")
    public String movieUserBillView(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-bill/view",false);
    }

    @RequestMapping("/page/movie-user-bill/import")
    public String movieUserBillImport(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-bill/import",false);
    }


    @RequestMapping("/page/android-device")
    public String androidDevice(HttpServletRequest request){
        return isAdminIndex(request,"page/android-device",false);
    }

    @RequestMapping("/page/android-device/edit")
    public String androidDeviceEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/android-device/edit",false);
    }

    @RequestMapping("/page/android-device/view")
    public String androidDeviceView(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-bill/view",false);
    }

    @RequestMapping("/page/android-device/import")
    public String androidDeviceImport(HttpServletRequest request){
        return isAdminIndex(request,"page/android-device/import",false);
    }

    @RequestMapping("/page/sailastv-client")
    public String sailastvClient(HttpServletRequest request){
        return isAdminIndex(request,"page/sailastv-client",false);
    }

    @RequestMapping("/page/sailastv-client/edit")
    public String sailastvClientEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/sailastv-client/edit",false);
    }

    @RequestMapping("/page/sailastv-client/view")
    public String sailastvClientView(HttpServletRequest request){
        return isAdminIndex(request,"page/sailastv-client/view",false);
    }

    @RequestMapping("/page/sailastv-client/import")
    public String sailastvClientImport(HttpServletRequest request){
        return isAdminIndex(request,"page/sailastv-client/import",false);
    }




    @RequestMapping("/page/movie-user-wallet")
    public String movieUserWallet(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-wallet",false);
    }

    @RequestMapping("/page/movie-user-wallet/edit")
    public String movieUserWalletEdit(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-wallet/edit",false);
    }

    @RequestMapping("/page/movie-user-wallet/view")
    public String movieUserWalletView(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-wallet/view",false);
    }

    @RequestMapping("/page/movie-user-wallet/import")
    public String movieUserWalletImport(HttpServletRequest request){
        return isAdminIndex(request,"page/movie-user-wallet/import",false);
    }

}